home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Graphics Programming (2nd Edition) / Visual Basic Graphics Programming 2nd Edition.iso / OldSrc / CH4 / SRC / FILEFRM3.FRM (.txt) < prev    next >
Encoding:
Visual Basic Form  |  1996-05-01  |  2.9 KB  |  107 lines

  1. VERSION 4.00
  2. Begin VB.Form FilesForm 
  3.    Caption         =   "Select Files"
  4.    ClientHeight    =   1410
  5.    ClientLeft      =   510
  6.    ClientTop       =   1035
  7.    ClientWidth     =   4065
  8.    Height          =   2100
  9.    Left            =   450
  10.    LinkTopic       =   "Form1"
  11.    ScaleHeight     =   1410
  12.    ScaleWidth      =   4065
  13.    Top             =   405
  14.    Width           =   4185
  15.    Begin VB.CommandButton CmdLoad 
  16.       Caption         =   "Load"
  17.       Default         =   -1  'True
  18.       Height          =   495
  19.       Left            =   1680
  20.       TabIndex        =   4
  21.       Top             =   840
  22.       Width           =   735
  23.    End
  24.    Begin VB.TextBox SourceText 
  25.       Height          =   285
  26.       Left            =   960
  27.       TabIndex        =   0
  28.       Text            =   "Dylan1.bmp"
  29.       Top             =   120
  30.       Width           =   3015
  31.    End
  32.    Begin VB.TextBox MaskText 
  33.       Height          =   285
  34.       Left            =   960
  35.       TabIndex        =   1
  36.       Text            =   "Dylan1M.bmp"
  37.       Top             =   480
  38.       Width           =   3015
  39.    End
  40.    Begin VB.Label Label1 
  41.       Caption         =   "Source"
  42.       Height          =   255
  43.       Index           =   0
  44.       Left            =   120
  45.       TabIndex        =   3
  46.       Top             =   120
  47.       Width           =   855
  48.    End
  49.    Begin VB.Label Label1 
  50.       Caption         =   "Mask"
  51.       Height          =   255
  52.       Index           =   2
  53.       Left            =   120
  54.       TabIndex        =   2
  55.       Top             =   480
  56.       Width           =   855
  57.    End
  58.    Begin VB.Menu mnuFile 
  59.       Caption         =   "File"
  60.       Begin VB.Menu mnuFileExit 
  61.          Caption         =   "E&xit"
  62.       End
  63.    End
  64. Attribute VB_Name = "FilesForm"
  65. Attribute VB_Creatable = False
  66. Attribute VB_Exposed = False
  67. Option Explicit
  68. Sub WaitEnd()
  69.     MousePointer = vbDefault
  70. End Sub
  71. Sub WaitStart()
  72.     MousePointer = vbHourglass
  73. End Sub
  74. Private Sub Form_Load()
  75. Dim pth As String
  76. Dim loc As Integer
  77.     pth = UCase$(App.Path)
  78.     loc = InStr(pth, "\CH4")
  79.     If loc > 0 Then pth = Left$(pth, loc + 3) & "\DATA"
  80.     SourceText.Text = pth & "\" & SourceText.Text
  81.     MaskText.Text = pth & "\" & MaskText.Text
  82. End Sub
  83. Private Sub Form_Unload(Cancel As Integer)
  84.     End
  85. End Sub
  86. ' ***********************************************
  87. ' End the application.
  88. ' ***********************************************
  89. Private Sub mnuFileExit_Click()
  90.     End
  91. End Sub
  92. ' ***********************************************
  93. ' Load the image files.
  94. ' ***********************************************
  95. Private Sub CmdLoad_Click()
  96. Dim frm As New CompositeForm3
  97.     On Error GoTo Done
  98.     WaitStart
  99.     frm.Show
  100.     frm.LoadFiles _
  101.         Trim$(SourceText.Text), _
  102.         Trim$(MaskText.Text)
  103.     frm.MakeComposite
  104. Done:
  105.     WaitEnd
  106. End Sub
  107.